import java.io.UnsupportedEncodingException;
import java.util.Arrays;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * User: happyiu
 * Date: 2021-12-06
 * Time: 21:58
 * Description:
 */
public class TestDemo {




    public static void main9(String[] args) throws UnsupportedEncodingException {
        String str = "你好";
        byte [] bytes = str.getBytes("utf-8");
        System.out.println(Arrays.toString(bytes));
        //打印[-28, -67, -96, -27, -91, -67]
    }

    public static void main8(String[] args) {
        byte[] bytes = {'h', 'e', 'l', 'l', 'o'};
        String string = new String(bytes,13);
        System.out.println(string);
        //打印ell
    }

    public static void main7(String[] args) {
        byte[] bytes = {'h', 'e', 'l', 'l', 'o'};
        String str = new String(bytes);
        System.out.println(str);
    }




    public static boolean isallnum(String s){

        /*for (int i = 0; i < s.length(); i++) {
              char c =s.charAt(i);
              boolean flg = Character.isAlphabetic(c);
              if(flg = false){
                  return false;
              }
        }
        return true;*/


         for (int i = 0; i < s.length(); i++) {
            char c = s.charAt(i);
            if(c < '0' || c > '9'){
                return false;
            }
        }
        return true;

    }

    public static void main5(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str = scanner.nextLine();
        System.out.println(isallnum(str));
        //123456 true
        //123a456 false

    }


    public static void main4(String[] args) {
        String str = "hello";
        char [] chars = str.toCharArray();
        for (int i = 0; i < chars.length; i++) {
            System.out.print(chars[i]+" ");
        }
    }

    public static void main3(String[] args) {
        String str = "hello";
        char ch = str.charAt(2);
        System.out.println(ch);
    }



    public static void main2(String[] args) {
        char [] arr ={'a','b','c','d','e','f'};
        String string = new String(arr,1,3);
        System.out.println(string);
    }

    public static void main1(String[] args) {
        char [] arr ={'a','b','c'};
        String string = new String(arr);
        System.out.println(string);
    }


}
